/**
 */
package gatperdut.chato.model.Chato.Room.impl;

import gatperdut.chato.model.Chato.Room.Door;
import gatperdut.chato.model.Chato.Room.RoomPackage;

import gatperdut.chato.model.Chato.Util.Lock;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Door</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.DoorImpl#getOocDesc <em>Ooc Desc</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.DoorImpl#getDesc <em>Desc</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.DoorImpl#isOpen <em>Open</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.DoorImpl#isSeeThrough <em>See Through</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.DoorImpl#getSingleWord <em>Single Word</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.DoorImpl#getLock <em>Lock</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class DoorImpl extends CDOObjectImpl implements Door {
	/**
     * The default value of the '{@link #getOocDesc() <em>Ooc Desc</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getOocDesc()
     * @generated
     * @ordered
     */
	protected static final String OOC_DESC_EDEFAULT = null;

	/**
     * The default value of the '{@link #getDesc() <em>Desc</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getDesc()
     * @generated
     * @ordered
     */
	protected static final String DESC_EDEFAULT = null;

	/**
     * The default value of the '{@link #isOpen() <em>Open</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #isOpen()
     * @generated
     * @ordered
     */
	protected static final boolean OPEN_EDEFAULT = false;

	/**
     * The default value of the '{@link #isSeeThrough() <em>See Through</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #isSeeThrough()
     * @generated
     * @ordered
     */
	protected static final boolean SEE_THROUGH_EDEFAULT = false;

	/**
     * The default value of the '{@link #getSingleWord() <em>Single Word</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getSingleWord()
     * @generated
     * @ordered
     */
	protected static final String SINGLE_WORD_EDEFAULT = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected DoorImpl() {
        super();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected EClass eStaticClass() {
        return RoomPackage.Literals.DOOR;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected int eStaticFeatureCount() {
        return 0;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getOocDesc() {
        return (String)eDynamicGet(RoomPackage.DOOR__OOC_DESC, RoomPackage.Literals.DOOR__OOC_DESC, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setOocDesc(String newOocDesc) {
        eDynamicSet(RoomPackage.DOOR__OOC_DESC, RoomPackage.Literals.DOOR__OOC_DESC, newOocDesc);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getDesc() {
        return (String)eDynamicGet(RoomPackage.DOOR__DESC, RoomPackage.Literals.DOOR__DESC, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDesc(String newDesc) {
        eDynamicSet(RoomPackage.DOOR__DESC, RoomPackage.Literals.DOOR__DESC, newDesc);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public boolean isOpen() {
        return (Boolean)eDynamicGet(RoomPackage.DOOR__OPEN, RoomPackage.Literals.DOOR__OPEN, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setOpen(boolean newOpen) {
        eDynamicSet(RoomPackage.DOOR__OPEN, RoomPackage.Literals.DOOR__OPEN, newOpen);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public boolean isSeeThrough() {
        return (Boolean)eDynamicGet(RoomPackage.DOOR__SEE_THROUGH, RoomPackage.Literals.DOOR__SEE_THROUGH, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setSeeThrough(boolean newSeeThrough) {
        eDynamicSet(RoomPackage.DOOR__SEE_THROUGH, RoomPackage.Literals.DOOR__SEE_THROUGH, newSeeThrough);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getSingleWord() {
        return (String)eDynamicGet(RoomPackage.DOOR__SINGLE_WORD, RoomPackage.Literals.DOOR__SINGLE_WORD, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setSingleWord(String newSingleWord) {
        eDynamicSet(RoomPackage.DOOR__SINGLE_WORD, RoomPackage.Literals.DOOR__SINGLE_WORD, newSingleWord);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Lock getLock() {
        return (Lock)eDynamicGet(RoomPackage.DOOR__LOCK, RoomPackage.Literals.DOOR__LOCK, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetLock(Lock newLock, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newLock, RoomPackage.DOOR__LOCK, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setLock(Lock newLock) {
        eDynamicSet(RoomPackage.DOOR__LOCK, RoomPackage.Literals.DOOR__LOCK, newLock);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
        switch (featureID) {
            case RoomPackage.DOOR__LOCK:
                return basicSetLock(null, msgs);
        }
        return super.eInverseRemove(otherEnd, featureID, msgs);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case RoomPackage.DOOR__OOC_DESC:
                return getOocDesc();
            case RoomPackage.DOOR__DESC:
                return getDesc();
            case RoomPackage.DOOR__OPEN:
                return isOpen();
            case RoomPackage.DOOR__SEE_THROUGH:
                return isSeeThrough();
            case RoomPackage.DOOR__SINGLE_WORD:
                return getSingleWord();
            case RoomPackage.DOOR__LOCK:
                return getLock();
        }
        return super.eGet(featureID, resolve, coreType);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case RoomPackage.DOOR__OOC_DESC:
                setOocDesc((String)newValue);
                return;
            case RoomPackage.DOOR__DESC:
                setDesc((String)newValue);
                return;
            case RoomPackage.DOOR__OPEN:
                setOpen((Boolean)newValue);
                return;
            case RoomPackage.DOOR__SEE_THROUGH:
                setSeeThrough((Boolean)newValue);
                return;
            case RoomPackage.DOOR__SINGLE_WORD:
                setSingleWord((String)newValue);
                return;
            case RoomPackage.DOOR__LOCK:
                setLock((Lock)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eUnset(int featureID) {
        switch (featureID) {
            case RoomPackage.DOOR__OOC_DESC:
                setOocDesc(OOC_DESC_EDEFAULT);
                return;
            case RoomPackage.DOOR__DESC:
                setDesc(DESC_EDEFAULT);
                return;
            case RoomPackage.DOOR__OPEN:
                setOpen(OPEN_EDEFAULT);
                return;
            case RoomPackage.DOOR__SEE_THROUGH:
                setSeeThrough(SEE_THROUGH_EDEFAULT);
                return;
            case RoomPackage.DOOR__SINGLE_WORD:
                setSingleWord(SINGLE_WORD_EDEFAULT);
                return;
            case RoomPackage.DOOR__LOCK:
                setLock((Lock)null);
                return;
        }
        super.eUnset(featureID);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public boolean eIsSet(int featureID) {
        switch (featureID) {
            case RoomPackage.DOOR__OOC_DESC:
                return OOC_DESC_EDEFAULT == null ? getOocDesc() != null : !OOC_DESC_EDEFAULT.equals(getOocDesc());
            case RoomPackage.DOOR__DESC:
                return DESC_EDEFAULT == null ? getDesc() != null : !DESC_EDEFAULT.equals(getDesc());
            case RoomPackage.DOOR__OPEN:
                return isOpen() != OPEN_EDEFAULT;
            case RoomPackage.DOOR__SEE_THROUGH:
                return isSeeThrough() != SEE_THROUGH_EDEFAULT;
            case RoomPackage.DOOR__SINGLE_WORD:
                return SINGLE_WORD_EDEFAULT == null ? getSingleWord() != null : !SINGLE_WORD_EDEFAULT.equals(getSingleWord());
            case RoomPackage.DOOR__LOCK:
                return getLock() != null;
        }
        return super.eIsSet(featureID);
    }

} //DoorImpl
